package controllayer;
import modellayer.*;


/**
 * Write a description of class PersonController here.
 * 
 * @author (Peter, Jonas og Dani) 
 * @version (09-12-2014)
 */
public class PersonController
{
    private KundeContainer kundeContainer;
    private static PersonController instance;
    /**
     * Constructor for objects of class PersonController
     */
    private PersonController()
    {
        kundeContainer = kundeContainer.getInstance();
    }

    /**
     * Singleton for PersonController.
     */
    public static PersonController getInstance()
    {
        if(instance == null)
        {
            instance = new PersonController();
        }
        
        return instance;
        
    }
    
    /**
     * Calls the findKunde method on the KundeContainer class, that returns a Kunde object if it exists.
     * 
     * @param  telefon   String to identify a Kunde
     * @return     a Kunde object or null if no Kunde is found.
     */
    public Kunde findKunde(String telefon)
    {
        Kunde search = kundeContainer.findKunde(telefon);
        return search;

    }
}
